\documentclass[UTF8]{article}
\usepackage{amsmath}
\begin{document}
Formatting example:

\[ A = \begin{pmatrix}
  a_{11} & a_{12} & a_{13} \\
  0 & a_{22} & a_{23} \\
  0 & 0 & a_{33}
\end{pmatrix} \]
\end{document}
